package com.it2297.main;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import com.it2297.model.Needy;
import com.it2297.model.User;

public class UserApp extends JFrame {

	private JPanel contentPane;

	
	private static User currentUser = null;
	private static Needy currentNeedy = null;
	
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					UserApp frame = new UserApp();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public UserApp() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
	}
	
	public static void setCurrentUser(User currentUser){
		UserApp.currentUser = currentUser;
	}
	
	public static User getCurrentUser(){
		return currentUser;
	} 
	public static void setCurrentNeedy(Needy currentNeedy){
		UserApp.currentNeedy = currentNeedy;
	}
	
	public static User getCurrentNeedy(){
		return currentNeedy;
	} 
}

